import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import * as ElIcons from '@element-plus/icons'
import 'element-plus/theme-chalk/index.css'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import './registerServiceWorker'
import router from './router'
import store from './store'

const app = createApp(App)
app.use(store)
// 全局注册Icon图标
const elIcons = ElIcons
for (const name in elIcons) {
  app.component(name, elIcons[name])
}
app.use(ElementPlus, { locale })
app.use(router)
app.mount('#app')
